home *** CD-ROM | disk | FTP | other *** search
/ PC User 2002 April / Disc 2 / PCUSER0402D2.iso / software / utils / files / wincron.exe / data1.cab / Sample_Scripts / onerror_test.tg < prev    next >
Encoding:
Text File  |  2001-10-20  |  434 b   |  21 lines

  1. ## onerror_test.tg
  2. # handle an error with an ONERROR handler
  3. # we fake the exception by raising the error ourself with 'raise'
  4.  
  5. {
  6.     -name onerror_test
  7.     -start 
  8.     -action -print raise an exception
  9.     -action -onerror my_error_procedure
  10.     -action -raise
  11.     -action -print should never reach this point
  12.     -action -inc 0 0 0 3
  13. }
  14.  
  15. {
  16.     -name my_error_procedure
  17.     -action -print This is the error handler
  18.     -action -return break
  19. }
  20.  
  21.